﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mail;
using System.Text;

namespace DO.Workflows
{
    public class EmailComponent : WorkflowComponentBase
    {
        public EmailComponent()
            : base()
        {
            this.ComponentName = "Email";
            this.Description = "Send email via outlook or SMTP";
            this.ComponentIconName = "Envelop.png";
            this.ComponentImageName = "Envelop.png";

            this._Instruction = new EmailInstruction(
                this.ComponentID, Guid.NewGuid(),
                false, string.Empty, string.Empty, string.Empty,
                string.Empty, string.Empty, true,
                string.Empty, string.Empty,
                true, 25, new List<string>(), 
                string.Empty, MailPriority.Normal, 
                new Dictionary<string, string>());
            this._Output = new EmailOutput(
                this.ComponentID, Guid.NewGuid());
        }

        #region Overrides of WorkflowComponentBase

        private EmailInstruction _Instruction;
        public override InstructionBase Instruction
        {
            get
            {
                return _Instruction;
            }
            set
            {
                _Instruction = (EmailInstruction)value;
            }
        }

        private EmailOutput _Output;
        public override ResultBase Output
        {
            get
            {
                return _Output;
            }
            set
            {
                _Output = (EmailOutput)value;
            }
        }
        #endregion
    }
}
